package com.gaofans.vertx.boot.dbutils.mapper.columns;

import com.gaofans.vertx.boot.dbutils.mapper.ColumnMapper;
import io.vertx.sqlclient.Row;

public class BooleanColumnMapper implements ColumnMapper {
    @Override
    public boolean match(final Class<?> propType) {
        return propType.equals(Boolean.TYPE) || propType.equals(Boolean.class);
    }

    @Override
    public Object apply(final Row r, final String columnName)  {
        return r.getBoolean(columnName);
    }
}
